class Solution
{
public:
    vector<int> countPoints(vector<vector<int>> &points, vector<vector<int>> &queries)
    {
        vector<int> answer;
        for (auto &query : queries)
        {
            int count = 0;
            for (auto &point : points)
            {
                int dx = point[0] - query[0];
                int dy = point[1] - query[1];
                int r = query[2];
                if (dx * dx + dy * dy <= r * r)
                {
                    ++count;
                }
            }
            answer.push_back(count);
        }
        return answer;
    }
};